package com.qq.weixin.mp.message.hxexp.model.send;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.hxexp.weixin.common.jaxb.CDATAAdapter;

/**
 * 支付结果处理响应
 *
 * 返回给微信服务器，确认接收通知
 * @author li.jiang
 *
 */
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public final class NotifyResponseJaxb implements Serializable {

    private static final long serialVersionUID = 8509200815882114979L;
    /**
     * 返回状态码 (SUCCESS/FAIL 此SUCCESS表示商户接收通知成功并校验成功  )
     */
    @XmlElement(name = "return_code")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String returnCode;
    /**
     * 返回信息 (如非空，为错误原因 )
     */
    @XmlElement(name = "return_msg")
    @XmlJavaTypeAdapter(value = CDATAAdapter.class)
    private String returnMsg;
    /**
     * @return the returnCode
     */
    public String getReturnCode() {
        return returnCode;
    }
    /**
     * @param returnCode the returnCode to set
     */
    public void setReturnCode(String returnCode) {
        this.returnCode = returnCode;
    }
    /**
     * @return the returnMsg
     */
    public String getReturnMsg() {
        return returnMsg;
    }
    /**
     * @param returnMsg the returnMsg to set
     */
    public void setReturnMsg(String returnMsg) {
        this.returnMsg = returnMsg;
    }
    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return String.format("NotifyResponse [returnCode=%s, returnMsg=%s]", returnCode, returnMsg);
    }
}
